/* Overlay d'arrière-plan */
#cookiebannercover {
    display: block;
    /* Forcé pour test */
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99998;
}

/* Boîte modale centrée */
#cookie-banner {
    display: block;
    /* Forcé pour test */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 99999;
    font-family: system-ui, -apple-system, sans-serif;
    color: #1f2937;
}

.cookie-header h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.cookie-header p {
    margin: 0 0 20px 0;
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Liste des options */
.cookie-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.cookie-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.option-info {
    display: flex;
    flex-direction: column;
}

.option-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
}

.option-desc {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
}

/* Styling des Sliders / Switches */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #d1d5db;
    transition: 0.25s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.25s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #2563eb;
    /* Bleu principal */
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.switch.disabled .slider {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* Boutons d'actions */
.cookie-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    width: 100%;
    padding: 10px;
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.btn-text {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px;
}

.btn-text:hover {
    color: #111827;
}

/* Bouton rond FIXE en bas à gauche */
#open-cookie-settings {
    display: none;
    /* Masqué au départ pendant l'ouverture du pop-up */
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: #2563eb;
    /* Bleu principal */
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 99990;
    /* Reste fixe au-dessus du contenu */
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#open-cookie-settings:hover {
    background-color: #1d4ed8;
    transform: scale(1.1);
}

#open-cookie-settings:active {
    transform: scale(0.95);
}